package com.punch.system.mapper;

import com.punch.common.vo.system.area.TreeAreaVO;
import com.punch.db.mapper.SuperMapper;
import com.punch.system.model.SysArea;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * SysAreaMapper-地区表 Mapper 接口
 *
 * @author wujj
 * @version 1.0.0
 * @since 2020/6/3 19:10
 */
@Mapper
public interface SysAreaMapper extends SuperMapper<SysArea> {


    /**
     * 根据父id查找子地区
     *
     * @param parentId 父id
     * @return List<TreeAreaVO>
     * @author wujj
     * @since 2020/6/4 19:22
     */
    List<TreeAreaVO> selectListByPid(@Param("parentId") Long parentId);

    /**
     * 地区树形（根据状态查询）
     *
     * @param status
     * @return
     */
    List<TreeAreaVO> treeAreaStatus(@Param("status") Integer status, @Param("parentId") Long parentId);
}
